//
//  LaomiPlayer.h
//  LaomiKit
//
//  Created by laomi on 2020/7/21.
//  Copyright © 2020 laomi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
//播放器的几种状态
typedef NS_ENUM(NSInteger, LaomiPlayerState) {
    LaomiPlayerStateBuffering = 1,//缓冲中
    LaomiPlayerStatePlaying   = 2,//正在播放
    LaomiPlayerStateStoppedByPlayEnd   = 3,//自然播放结束
    LaomiPlayerStatePause     = 4, //暂停
};
//播放进度b
extern NSString *const Laomi_PlayerProgressChangeNotification;
//播放结束
extern NSString *const Laomi_PlayerEndNotification;




@interface LaomiPlayer : NSObject
@property(nonatomic,assign)LaomiPlayerState playStatus;
@property (nonatomic, strong) NSObject       *playbackTimeObserver;
@property (strong, nonatomic) AVAudioPlayer *player;
+(instancetype)shareInstance;
// 暂停
-(void)laomi_pause;
// 播放
-(void)laomi_play;

// 停止
-(void)laomi_stop;

//播放初始化
-(void)playWithUrl:(NSURL*)url;

//快进
-(void)seekToTime:(double)seconds;


@end


